
public class Point3D {
	
	protected double z;
	protected Point2D p;
	
	public Point3D(double x, double y, double z) {
		this.p.x=x;
		this.p.y=y;
		this.z=z;
		
	}
	
	public Point3D() {
		super();
		
	}
	
	
	public double getX() {
		return p.getX();
	}

	public void setX(double x) {
		this.p.setX(x) ;
	}

	public double getY() {
		return p.getY();
	}

	public void setY(double y) {
		this.p.setY(y);
	}

	public double getZ() {
		return z;
	}

	public void setZ(double z) {
		this.z = z;
	}

	public Point2D getP() {
		return p;
	}

	public void setP(Point2D p) {
		this.p = p;
	}
	
	public double distace(Point3D a) {
		
		double dist= Math.sqrt(Math.pow( (a.getX() -this.getX()),2.0) + Math.pow((a.getY()-this.getY()), 2.0) + Math.pow((a.getZ()-this.getZ()),2.0));
		return dist;
	}
	
	
	public static void main(String args []){
		
		Point3D p1,p2;
		
		
		
	}
}
